import request from '@/utils/request'
//查询
export const plantingcostinfoGetService = () => {
  return request.get('adminplantingcost/search')
}
//添加
export const plantingcostinfoAddService = ({
  id,
  vegetableid,
  seedcosts,
  fertilizercosts,
  pesticidecosts,
  laborcosts,
  othercosts,
  totalcosts,
  remarks,
  name
}) => {
  return request.post('adminplantingcost/add', {
    id,
    vegetableid,
    seedcosts,
    fertilizercosts,
    pesticidecosts,
    laborcosts,
    othercosts,
    totalcosts,
    remarks,
    name
  })
}
//更新
export const plantingcostinfoUpService = ({
  id,
  vegetableid,
  seedcosts,
  fertilizercosts,
  pesticidecosts,
  laborcosts,
  othercosts,
  totalcosts,
  remarks,
  name
}) => {
  return request.put('adminplantingcost/up', {
    id,
    vegetableid,
    seedcosts,
    fertilizercosts,
    pesticidecosts,
    laborcosts,
    othercosts,
    totalcosts,
    remarks,
    name
  })
}
//删除
export const plantingcostinfoDlService = (id) => {
  return request.delete('adminplantingcost/delete', {
    params: { id }
  })
}
